package com.cheetah.constants;

/**
 * @ClassName ProtocolConstants
 * @Description: TODO
 * @Author Administrator
 * @Date 2019/7/22
 * @Version V1.0
 **/
public class ProtocolConstants {

    public static final int PROTOCOL_MAGIC_LEN = 2; //

    public static final int PROTOCOL_VERSION_LEN = 2; //

    public static final int PROTOCOL_TYPE_LEN = 4; //

    public static final int PROTOCOL_FLAG_LEN = 2; //

    public static final int PROTOCOL_HEADER = 4; //

    public static final int PROTOCOL_BODY = 4; //

    public static final int PROTOCOL_HEAD_LENGTH = PROTOCOL_MAGIC_LEN
                                                + PROTOCOL_VERSION_LEN
                                                + PROTOCOL_TYPE_LEN
                                                + PROTOCOL_FLAG_LEN
                                                + PROTOCOL_HEADER
                                                + PROTOCOL_BODY;

    public static final short PROTOCOL_MAGIC_PROTO = 0x11ec;
    public static final short PROTOCOL_MAGIC_HEARTBEAT = 0x21fd;
    public static final short PROTOCOL_VERSION_PROTO = 0x01;
    public static final short PROTOCOL_FlAG_PROTO_0 = 0x00;
    public static final short PROTOCOL_FlAG_PROTO_1 = 0x01;
}
